package com.test.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
@Component("company")
@Scope("prototype")
public class Company {
    @Resource(name = "softwareEngineer")
    Engineer engineer;

    public Company(Engineer engineer){
        this.engineer = engineer;
    }
    public Company(){
        System.out.println("Company------------------------------");

    }

    public String  run(String str,String name){


        System.out.println("run1-------------------"+name);
        engineer.work();

        String s=null;
        s.toString();

        return name;

    }

    public Engineer getEngineer() {
        return engineer;
    }

    public void setEngineer(Engineer engineer) {
        this.engineer = engineer;
    }
}
